<?php

/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2018/11/23
 * Time: 11:12 AM
 */
class ShopModel extends \think\Model
{
    function __construct($data = [])
    {
        parent::__construct($data);

        \think\Config::set('database',$this->connection);
    }

    protected $connection = [
        'type' => 'mysql',
//        'hostname' => '61.129.51.183',
       'hostname' => 'rm-uf66r00j217i4egckzo.mysql.rds.aliyuncs.com',
//        'hostport' => '12334',
        'hostport' => '3306',
        'database' => 'salesman',
//        'database' => 'shop',
        'username' => 'root2',
//        'password' => 'bhujmn',
        'password' => 'WWWlife8',
        'charset' => 'utf8',
        'prefix' => 'sh_',
        'datetime_format' => 'Y-m-d H:i:s',
        'debug' => true,
//        'resultset_type' => 'collection',
    ];
}